package com.lzs.bootsafety.common.exception;
/**
 * @author  zhanshi Liu
 * @date    2020/04/28
 * @website www.jhmsona.cn
 */
public class LzsException extends RuntimeException{
    /** 错误状态码 */
    private String resultCode;
    /** 错误描述 */
    private String resultMsg;
    public LzsException() {
        super();
    }

    public LzsException(BaseExceptionInterface message) {
        super(message.getResultCode());
        this.resultCode=message.getResultCode();
        this.resultMsg=message.getResultMsg();
    }

    public LzsException(BaseExceptionInterface message, Throwable cause) {
        super(message.getResultCode(), cause);
        this.resultMsg = message.getResultMsg();
        this.resultCode = message.getResultCode();
    }

    public LzsException(String errorMsg) {
        super(errorMsg);
        this.resultMsg = errorMsg;
    }

    public LzsException(String errorCode,String errorMsg) {
        super(errorCode);
        this.resultMsg = errorMsg;
        this.resultCode = errorCode;
    }
    public LzsException(String errorCode, String errorMsg, Throwable cause) {
        super(errorCode, cause);
        this.resultCode = errorCode;
        this.resultMsg = errorMsg;
    }
    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String errorCode) {
        this.resultCode = errorCode;
    }

    public String getResultMsg() {
        return resultMsg;
    }

    public void setResultMsg(String errorMsg) {
        this.resultMsg = errorMsg;
    }

    public String getMessage() {
        return resultMsg;
    }

    @Override
    public Throwable fillInStackTrace() {
        return this;
    }
}
